package com.atguigu.gmall.product.service.impl;

import com.atguigu.gmall.model.product.BaseTrademark;
import com.atguigu.gmall.product.mapper.BaseTrademarkMapper;
import com.atguigu.gmall.product.service.BaseTrademarkService;
import com.atguigu.gmall.product.util.TestGit;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.sql.Wrapper;

/**
 * @Author: zm
 * @Date: 2021/8/8 20:30
 */
@Service
public class BaseTrademarkServiceImpl extends ServiceImpl<BaseTrademarkMapper,BaseTrademark> implements BaseTrademarkService {


    // 获取到所有的品牌数据 分页
    @Override
    public IPage<BaseTrademark> getBaseTradeMarekList(Page<BaseTrademark> baseTrademarkPage) {
//        baseMapper.selectPage(baseTrademarkPage, null);
        QueryWrapper<BaseTrademark> wrapper = new QueryWrapper<>();
        wrapper.orderByDesc("id");
        testGit();
        return baseMapper.selectPage(baseTrademarkPage, wrapper);
    }

    public void testGit(){
        // 测试 git
        TestGit.print();
    }
}
